<template>
<div>
  <h2>当前值:{{sum}}</h2>
  <button @click='addSum(1)'>点我+1</button>
</div>
</template>
<script>
import {mapState,mapActions} from 'vuex'
// import TestSon from '@/components/TestSon'
export default {
  name:'TestFather',
  components:{
    // TestSon,
  },
  data() {
    return {
    }
  },
  computed:{
    ...mapState('addAbout',['sum']),
  },
  mounted() {
    console.log(this,'@@')
  },
  methods: {
   ...mapActions('addAbout',['addSum'])
  },
  beforeDestroy() {
  },
}
</script>
